# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-mines
pkgver=3.26.0+5+g7f5a1e5
pkgrel=1
pkgdesc="Clear hidden mines from a minefield"
url="https://wiki.gnome.org/Apps/Mines"
arch=(i686 x86_64)
license=(GPL)
depends=(gtk3 librsvg libgnome-games-support)
makedepends=(itstool gobject-introspection yelp-tools appstream-glib vala git meson)
groups=(gnome-extra)
_commit=7f5a1e5c619325c17f378281c35bdd4b30534331  # master
source=("git+https://git.gnome.org/browse/gnome-mines#commit=$_commit"
        icon-fixes.diff)
sha256sums=('SKIP'
            'cf44d54e432a6e9b46a052070287e9d018339b9a49393d727ce6a2d807688a54')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
  patch -Np1 -i ../icon-fixes.diff
}

build() {
  cd build
  meson setup --prefix=/usr --buildtype=release ../$pkgname
  ninja
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
